﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class GroupKPIFacade
    {
        public string Save(GroupKPI Groups)
        {
            GroupKPIController cont = new GroupKPIController();
            return cont.Save(Groups);
        }

        public string Delete(GroupKPI Groups)
        {
            GroupKPIController cont = new GroupKPIController();
            return cont.Delete(Groups);
        }

        public string BeforeDelete(GroupKPI Groups)
        {
            GroupKPIController cont = new GroupKPIController();
            return cont.BeforeDelete(Groups);
        }

        public IList<GroupKPI> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<GroupKPI> Groups = new List<GroupKPI>();
            GroupKPIController cont = new GroupKPIController();
            Groups = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return Groups;
        }

        public GroupKPI GetGroupKPIByID(int ID)
        {
            GroupKPI Groups = new GroupKPI();
            GroupKPIController cont = new GroupKPIController();
            Groups = cont.GetGroupKPIByID(ID);
            return Groups;
        }

        public GroupKPI GetGroupKPIByDescription(string Description)
        {
            GroupKPI Groups = new GroupKPI();
            GroupKPIController cont = new GroupKPIController();
            Groups = cont.GetGroupKPIByDescription(Description);
            return Groups;
        }
    }
}